<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/sys/user.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
			
		}
	});
	$('#editUserForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
});
</script>

<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<div>
	<h3 class="title"><i class="fontello-icon-th-list-1"></i> 编辑用户信息</h3>
</div>
<div class="widget" >
	<div class="widget-content">
		<form id="editUserForm">
			<table class="table" style="width:450px;">
				<tr>
					<td style="width:100px;">E-mail</td>
					<td>
						<input class="form-control" type="text" id="email" name="email" value="${(user.email)!''}" />
						<input type="hidden" id="code" name="code" value="${(user.code)!''}" />
					</td>
				</tr>
				<tr>
					<td>姓名</td>
					<td><input class="form-control" type="text" id="realName" name="realName" value="${(user.realName)!''}" /></td>
				</tr>
				<tr>
					<td>所属机构</td>
					<td>
						<div class="input-group" style="width:200px;">
							<span class="btn-group">
								<input  name="on" id="on" value="${(user.on)!''}" class="form-control" size="16" type="text" readonly="readonly" style="width: 135px" />
								<input type="hidden" name="oc" id="oc" value="${(user.oc)!''}" class="form-control"/>
								<button class="btn btn-primary" type="button" title="选择该用户所属机构" onclick="javascript: selectOrganization_user($('#oc').attr('id'), $('#on').attr('id'));"><i class="icon-search"></i></button>
								<button class="btn btn-danger" type="button" title="去除机构查询条件" onclick="javascript: $('#oc').val(''); $('#on').val('');"><i class="icon-remove"></i></button>
							</span>
						</div>
					</td>
				</tr>
				<tr>
					<td>角色</td>
					<td style="width: 100px;"><@mte.Role id='uniform_undefined' name='rc' nullstr='所有' organCode=(cu_organCode) classname="uniformselect"/></td>
				</tr>
				<tr>
					<td>是否管理员</td>
					<td><@mt.YesOrNo value=((user.isManager)!false) r=true name='isManager' d=false mc=false /></td>
				</tr>
				<tr>
					<td>是否屏蔽</td>
					<td><@mt.YesOrNo value=((user.deleted)!false) r=true name='deleted' d=false mc=false /></td>
				</tr>
				<tr>
					<td style="color:red; font-weight:bold; text-align:center;" colspan="2">创建成功后，默认登录密码为：000000</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript: saveUser_user(); return false;"><i class="icon-save"></i>&nbsp;保&nbsp;&nbsp;存</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" class="btn btn-primary" onclick="javascript: sys_load_handle('user');"><i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>